package com.baorant;

import org.springframework.beans.factory.annotation.Autowired;

public class A {
//    @Autowired
    private B b;

    public A()
    {
        System.out.println("进入类A的构造函数");
    }

    public B getB() {
        return b;
    }

    @Autowired
    public void setB(B b) {
        this.b = b;
    }

    public void Hellob() {
        b.sayHello();
    }
}


